import request from '@/utils/request'

/**
 * 查询
 * @returns {AxiosPromise}
 */
export function getList() {
  return request({
    url: '/product-superior',
    method: 'get'
  })
}

export function save(data) {
  return request({
    url: '/product-superior',
    method: 'post',
    data
  })
}

export function remove(id) {
  return request({
    url: `/product-superior/${id}`,
    method: 'delete'
  })
}

export function update(data) {
  return request({
    url: '/product-superior',
    method: 'put',
    data
  })
}

// 查询类别
export function queryCategory() {
  return request({
    url: 'product-category/getAll',
    method: 'get'
  })
}

export function getProductList(params) {
  return request({
    url: 'product-info/getAll',
    method: 'get',
    params
  })
}
